<?php
// 检查邮件系统
/*
if (has_module('Mail')) {
    $m = D('MailList');
    $one = $m->where(array('status' => 1, 'sendtime' => array('LT', time())))->find();
    if (!empty($one)) {
        $ret = D('Mail', 'Service')->safe_send_one($one['receiver'], $one['subject'], $one['content']);
        if (true === $ret) {
            $m->delete($one['id']);
        } else {
            $m->where(array('id' => $one['id']))->save(array('failed_times' => $one['failed_times'] + 1));
        }
    }
}
*/